package top.lixunda.ecommerce.server.good.api.controller;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import top.lixunda.commerce.common.core.entity.MessageObject;
import top.lixunda.ecommerce.server.business.api.entity.vo.ImageUploadTokenVO;
import top.lixunda.ecommerce.server.good.api.entity.vo.GoodPictureVO;

import java.util.List;

/**
 * 商品图片信息
 *
 * @author Xumda
 * @version time:2020/1/15 15:30
 */
@SuppressWarnings("unused")
@Api("商品图片信息")
@RequestMapping("/good-picture")
public interface IGoodPictureController {

    /**
     * 根据图片id获取图片信息
     *
     * @param id 图片保存的id
     * @return 图片信息
     */
    @ApiOperation("根据图片id获取图片信息")
    @GetMapping("queryById")
    MessageObject<GoodPictureVO> queryById(@RequestParam("id") Integer id);

    /**
     * 根据商品id获取图片信息
     *
     * @param id 图片保存的id
     * @return 图片信息
     */
    @ApiOperation("根据商品id获取图片信息")
    @GetMapping("queryByGoodId")
    MessageObject<List<GoodPictureVO>> queryByGoodId(@RequestParam("id") Integer id);

}
